// Talking

function talkstart()
{
talk("Example Text: Hello World");
}
function talk(str)
{
if(IsMapEngineRunning())
{
	var font = GetSystemFont(); // Font Object
	RenderMap(); // Get Map Image
	var map_image = GrabImage(0,0, GetScreenWidth(), GetScreenHeight()); // Get Image
	FlipScreen(); // Clear Buffer
	map_image.blit(0,0);
	Rectangle(0, 0, GetScreenWidth(), GetScreenHeight(), CreateColor(0,0,0, 100));
  var width = GetScreenWidth() - 32;
  var height = font.getStringHeight(str, width);
  var y = (GetScreenHeight()-1)-height;
  var x = 16;
  // Rectangle(x-2,y-2,width,height+2,CreateColor(255,153,51));
  var topcol = CreateColor(255,153,51);
	var botcol = CreateColor(255,174,163);
  GradientRectangle(x-5, y-5, width+4, height+8, topcol,botcol,topcol,botcol);
	font.drawTextBox(x, y, width, height, 0, str);
	OutlinedRectangle(x-5, y-5, width+4, height+8,CreateColor(255,204,0),3)
	FlipScreen();
	GetKey();
}
}
talk(0,0,"hi");